#include <iostream>
#define N 20

using namespace std;


int main(){

int array[N];
int i;
int n;
int sum=0;

cout<<"Type the number of elements you want in the array (max 20)"<<endl;
cin>>n;
cout<<"Type the elements"<<endl;

for(i=0; i<n; i++){
	cin>>array[i];}

cout<<"The original array is ";

for(i=0; i<n; i++){
	cout<<array[i]<<" ";}
cout<<endl;

for(i=0; i<n; i++){
	sum +=array[i];}

cout<<"The sum of the elements is "<< sum<< endl;

return 0;
}
